import request from '@/utils/request'

// 查询商户与机构合作协议列表
export function listContract(query) {
  return request({
    url: '/company/contract/list',
    method: 'get',
    params: query
  })
}

export function userListContract(query) {
  return request({
    url: '/company/contract/userList',
    method: 'get',
    params: query
  })
}


// 查询商户与机构合作协议详细
export function getContract(tenantOrgId) {
  return request({
    url: '/company/contract/' + tenantOrgId,
    method: 'get'
  })
}

// 新增商户与机构合作协议
export function addContract(data) {
  return request({
    url: '/company/contract',
    method: 'post',
    data: data
  })
}

// 修改商户与机构合作协议
export function updateContract(data) {
  return request({
    url: '/company/contract',
    method: 'put',
    data: data
  })
}

// 删除商户与机构合作协议
export function delContract(tenantOrgId) {
  return request({
    url: '/company/contract/' + tenantOrgId,
    method: 'delete'
  })
}
